import requests
class tpshop:
    def login_succes(self,user,pwd):
        mysussion = requests.session()
        mysussion.get(url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify&r=0.5373426988891326")
        headers_date = {"Content-Type": "application/x-www-form-urlencoded"}
        data_a = {"username": user, "password": pwd, "verify_code": "8888"}
        resp = mysussion.post(
            url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login&t=0.22630274230702652",
            headers=headers_date,
            data=data_a)
        return resp
